package com.silverhaze.diamond.client.resources;

import com.silverhaze.commons.utils.resource.ResourceAllocator;

import java.util.Properties;

/**
 * SystemUser: Babanin
 * Date: 24.07.2008
 * Time: 1:19:32
 */
public class BuildNumber {

    private static int buildValue = -1;

    public static int getBuildNumber() {
        if (buildValue == -1) {
            Properties properties = new Properties();

            try {
                properties.load(ResourceAllocator.getResource("build.number"));
                buildValue = Integer.parseInt(properties.getProperty("build.number"));
            } catch (Exception e) {
                e.printStackTrace();
            }

        }

        return buildValue;
    }
}

